﻿Imports System.Net.Mail

Public Class EmailClass

    Public Sub sendMail(ByVal toEmployee As Object, ByVal msg As String)

        Dim mail As MailMessage = New MailMessage()
        mail.To.Add(toEmployee)
        mail.From = New MailAddress("cosc320twin@gmail.com")
        mail.Subject = "TWIN Notification"
        mail.Body = msg
        mail.IsBodyHtml = True

        Dim smtp As SmtpClient = New SmtpClient()
        smtp.Host = "smtp.gmail.com"
        smtp.Port = 587
        smtp.Credentials = New System.Net.NetworkCredential("cosc320twin@gmail.com", "shumbashumba")
        smtp.EnableSsl = True
        smtp.Send(mail)

    End Sub


End Class
